home *** CD-ROM | disk | FTP | other *** search
/ Comix Games / Comix Games.iso / waldo / waldo.exe / FINAL08.DXR / 00260.ls < prev    next >
Encoding:
Text File  |  1995-10-08  |  1.4 KB  |  69 lines

  1. on initRearWindow
  2.   global rwObj
  3.   if objectp(rwObj) then
  4.     rwObj(mdispose)
  5.   end if
  6.   makeObjIfNeeded()
  7. end
  8.  
  9. on releaseRearWindow
  10.   global rwObj
  11.   if objectp(rwObj) then
  12.     rwObj(mdispose)
  13.   end if
  14. end
  15.  
  16. on UnCoverDesktop
  17.   global rwObj
  18.   if objectp(rwObj) then
  19.     rwObj(mdispose)
  20.   end if
  21.   unLoad()
  22. end
  23.  
  24. on makeObjIfNeeded
  25.   global rwObj
  26.   if not objectp(rwObj) then
  27.     set rwObj to RearWindow(mnew, "M")
  28.     if value(rwObj) < 0 then
  29.       alert("System error" && rwObj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  30.       stopMovie()
  31.       exit
  32.     end if
  33.     if the freeBlock < rwObj(mGetMemoryNeeded) then
  34.       if objectp(rwObj) then
  35.         rwObj(mdispose)
  36.         set rwObj to RearWindow(mnew, "S")
  37.       end if
  38.       if value(rwObj) < 0 then
  39.         alert("System error" && rwObj && "trying to create the RearWindow object in RAM (single-monitor config).")
  40.         stopMovie()
  41.         exit
  42.       end if
  43.     end if
  44.   end if
  45. end
  46.  
  47. on fillWithIndexColor
  48.   global rwObj
  49.   makeObjIfNeeded()
  50.   set patVar to 255
  51.   rwObj(mIndexColorToWindow, patVar)
  52. end
  53.  
  54. on fillWithSpecificColor whichColor
  55.   global rwObj
  56.   if the machineType <> 256 then
  57.     makeObjIfNeeded()
  58.     if whichColor = 0 then
  59.       rwObj(mPatToWindow, -1)
  60.     else
  61.       if whichColor = 255 then
  62.         rwObj(mPatToWindow, -5)
  63.       else
  64.         rwObj(mIndexColorToWindow, whichColor)
  65.       end if
  66.     end if
  67.   end if
  68. end
  69.